home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 242 / Issue 242 - April 2008 - DPCS0408DVD.ISO / Open Source / AutoHotKey / Source / AutoHotkey104705_source.exe / source / stdafx.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-06-01  |  3.0 KB  |  67 lines

  1. /*
  2. AutoHotkey
  3.  
  4. Copyright 2003-2007 Chris Mallett (support@autohotkey.com)
  5.  
  6. This program is free software; you can redistribute it and/or
  7. modify it under the terms of the GNU General Public License
  8. as published by the Free Software Foundation; either version 2
  9. of the License, or (at your option) any later version.
  10.  
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15. */
  16.  
  17. // stdafx.h : include file for standard system include files,
  18. // or project specific include files that are used frequently, but
  19. // are changed infrequently
  20. //
  21.  
  22. #pragma once
  23.  
  24. #define _CRT_SECURE_NO_DEPRECATE // Avoid compiler warnings in VC++ 8.x/2005 that urge the use of lower-performing C library functions that protect against buffer overruns.
  25. #define WIN32_LEAN_AND_MEAN         // Exclude rarely-used stuff from Windows headers
  26.  
  27. // Windows Header Files:
  28. // Necessary to do this prior to including windows.h so that NT functions are unlocked:
  29. // UPDATE: Using 0x0500 now so that VK_XBUTTON1 and 2 can be supported:
  30. // UPDATE v1.0.36.03: Using 0x0501 now so that various ListView constants and other things can be used.
  31. // UPDATE v1.0.36.05: 0x0501 broke the Tooltip cmd on on Win9x/NT4/2000 by increasing the size of the TOOLINFO
  32. // struct by 4 bytes.  However, rather than forever go without 0x501 and the many upgrades and constants
  33. // it makes available in the code, it seems best to stick with it and instead patch anything that needs it
  34. // (such as ToolTip).  Hopefully, ToolTip is the only thing in the current code base that needs patching
  35. // (perhaps the only reason it was broken in the first place was a bug or oversight by MS).
  36. #define _WIN32_WINNT 0x0501
  37. #define _WIN32_IE 0x0501  // Added for v1.0.35 to have MCS_NOTODAY resolve as expected, and possibly solve other problems on newer systems.
  38.  
  39. #ifdef _MSC_VER
  40.     // C RunTime Header Files
  41.     #include <stdio.h>
  42.     #include <stdlib.h>
  43.     #include <stdarg.h> // used by snprintfcat()
  44.     #include <limits.h> // for UINT_MAX, UCHAR_MAX, etc.
  45.     #include <malloc.h> // For _alloca()
  46.     //#include <memory.h>
  47.     //#include <tchar.h>
  48.  
  49.     #include <windows.h>
  50.     #include <commctrl.h> // for status bar functions. Must be included after <windows.h>.
  51.     #include <shellapi.h>  // for ShellExecute()
  52.     #include <shlobj.h>  // for SHGetMalloc()
  53.     #include <mmsystem.h> // for mciSendString() and waveOutSetVolume()
  54.     #include <commdlg.h> // for OPENFILENAME
  55.  
  56.     // It's probably best not to do these, because I think they would then be included
  57.     // for everything, even modules that don't need it, which might result in undesired
  58.     // dependencies sneaking in, or subtle naming conflicts:
  59.     // ...
  60.     //#include "defines.h"
  61.     //#include "application.h"
  62.     //#include "globaldata.h"
  63.     //#include "window.h"  // Not to be confused with "windows.h"
  64.     //#include "util.h"
  65.     //#include "SimpleHeap.h"
  66. #endif
  67.